Many software communication products and applications have the requirement to encode (build) and decode (interpret) complex, self-defining data streams. In network and device communications, data stream architecture refers to the format that is used to assemble various data items for transmission and reception via a communications network or data channel. There are many such data architectures. In general, the format of data incoming or outgoing from a given application, program or data channel is dependent on the type of data pertinent to the particular application, program or device connected to the data channel. For System Network Architecture (SNA) services, for example, different types of data architectures are associated with SNA products such as Distribution Services (SNA/DS), Document Interchange Architecture (DIA), and Communications and Systems Management (CSM). There are many other examples. Different types of data architectures for different services usually occur because of the particular requirements of the services and to minimize the number of bytes to be transported for each of the different services, while at the same time allowing flexibility for future changes and additions.
When information needs to be transmitted, data elements of interest must be assembled in a linear sequence that conforms to the data stream architecture. This process is called encoding. Conversely, when a data stream arrives at its destination, the data stream must be analyzed and the data items extracted and converted to a form that is useful to the associated application or software. This process is called decoding. The term parsing refers to the processes that are required to accomplish the encoding and decoding. For different data stream architectures, of course, different parsing logic is required. Presently, software developers typically implement individual parsing procedures within a data processing system or node to encode and decode the different types of data streams that might be encountered. For example, the data streams (types of data items and their ordering) would typically be quite different for a payroll software application as contrasted with that for a magnetic storage medium, such as a harddisk. Additionally, these individual parsing procedures typically receive from or pass data to an application, or the like, serially as the data is received. This requires that the applications, etc. be aware of the data stream format that is used to interpret the data properly.
The implementation of many individual parsing procedures within a single system to accommodate different data stream architectures is costly and inefficient in terms of design, maintenance and consumption of system resources. It would be beneficial if a single, general data stream parser could be designed. In addition, an interface structure between such a parser and the using applications is needed to shelter the applications from the burden of having to know detailed information regarding the data stream format in use.